
const langData = (key) => {
  return   this.$t("ModuleDevice.utils." + key);
};
const statusList2 = [
  { value: 0, name: "禁用" },
  { value: 1, name: "启用" },
];
// if (isEn) {
//   statusList2.forEach((item, index) => {
//     item.name = langData("statusList")[index];
//   });
// }
export const statusList = statusList2;
const YesAndNo2 = [
  { value: 0, name: "否" },
  { value: 1, name: "是" },
];
// if (isEn) {
//   YesAndNo2.forEach((item, index) => {
//     item.name = langData("YesAndNo")[index];
//   });
// }
export const YesAndNo = YesAndNo2;

export const purposeId = "1681217577185054720"; // 设备用途 默认检测
export const receiveStatusId = "1681218150919704576"; // 接收状态，默认全新
export const waibu = "1684397621382352896"; // 外部借用
export const neibu = "1684397495712616448"; // 内部借用
export const normal = "1683345386347040768"; // 设备状态，正常
export const blockUp = "1683345513853882368"; // 停用
export const normalName = () => {
  return "正常";
}; // 设备状态，正常
export const scrap = "1683345888682053632"; // 设备状态报废
export const malfunction = "1683345781769244672"; // 故障
export const demotion = "1683345693323956224"; // 降级
export const filterTypeSendBack = {
  SendBack: ["1683345386347040768", "1683345781769244672"],
};
// 设备变更
export const filterTypeSendBackName = {
  ChangeName: ["降级", "停用", "报废", "正常", "故障"],
};

// 正常,故障
export const showInputText = isEn ? "Other" : "其他";

const maintenanceTaskPlanStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 30,
    label: "已生效",
  },
  {
    value: 70,
    label: "已作废",
  },
  {
    value: 80,
    label: "已结束",
  },
];
// if (isEn) {
//   maintenanceTaskPlanStatus2.forEach((item, index) => {
//     item.label = langData("maintenanceTaskPlanStatus")[index];
//   });
// }
export const maintenanceTaskPlanStatus = maintenanceTaskPlanStatus2;
const maintenanceTaskStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待处理",
  },
  {
    value: 30,
    label: "已完成",
  },
  {
    value: 70,
    label: "已作废",
  },
];
// if (isEn) {
//   maintenanceTaskStatus2.forEach((item, index) => {
//     item.label = langData("maintenanceTaskStatus")[index];
//   });
// }
export const maintenanceTaskStatus = maintenanceTaskStatus2;
const repairStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 30,
    label: "已完成",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 50,
    label: "维修中",
  },
  {
    value: 70,
    label: "已作废",
  },
];
// if (isEn) {
//   repairStatus2.forEach((item, index) => {
//     item.label = langData("repairStatus")[index];
//   });
// }
export const repairStatus = repairStatus2;

const changeStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 30,
    label: "已通过",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 70,
    label: "已作废",
  },
];
if (isEn) {
  changeStatus2.forEach((item, index) => {
    item.label = langData("changeStatus")[index];
  });
}
export const changeStatus = changeStatus2;

export const conclusion = [
  {
    value: 10,
    label: "符合要求",
  },
  {
    value: 20,
    label: "不符合要求",
  },
];

const calibrationType2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "定期校准",
  },
  {
    value: 20,
    label: "临时校准",
  },
];
if (isEn) {
  calibrationType2.forEach((item, index) => {
    item.label = langData("calibrationType")[index];
  });
}
export const calibrationType = calibrationType2;

const maintainType2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "定期维保",
  },
  {
    value: 20,
    label: "临时维保",
  },
];
if (isEn) {
  maintainType2.forEach((item, index) => {
    item.label = langData("maintainType")[index];
  });
}
export const maintainType = maintainType2;

export const periodUnit2 = [
  {
    value: 1,
    label: "年",
  },
  {
    value: 2,
    label: "月",
  },
  {
    value: 3,
    label: "天",
  },
];
if (isEn) {
  periodUnit2.forEach((item, index) => {
    item.label = langData("periodUnit")[index];
  });
}
export const periodUnit = periodUnit2;

const deviceVerificationTaskType2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "期间核查",
  },
  {
    value: 20,
    label: "临时核查",
  },
];
if (isEn) {
  deviceVerificationTaskType2.forEach((item, index) => {
    item.label = langData("deviceVerificationTaskType")[index];
  });
}
export const deviceVerificationTaskType = deviceVerificationTaskType2;

const deviceCalibrationStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 30,
    label: "已生效",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 70,
    label: "已作废",
  },
];
if (isEn) {
  deviceCalibrationStatus2.forEach((item, index) => {
    item.label = langData("deviceCalibrationStatus")[index];
  });
}
export const deviceCalibrationStatus = deviceCalibrationStatus2;

const deviceVerificationTaskStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待处理",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 70,
    label: "已作废",
  },
  {
    value: 30,
    label: "已完成",
  },
  {
    value: 40,
    label: "已驳回",
  },
];
if (isEn) {
  deviceVerificationTaskStatus2.forEach((item, index) => {
    item.label = langData("deviceVerificationTaskStatus")[index];
  });
}
export const deviceVerificationTaskStatus = deviceVerificationTaskStatus2;

const maintenancePlanStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 30,
    label: "已生效",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 70,
    label: "已作废",
  },
  {
    value: 80,
    label: "已结束",
  },
];
if (isEn) {
  maintenancePlanStatus2.forEach((item, index) => {
    item.label = langData("maintenancePlanStatus")[index];
  });
}
export const maintenancePlanStatus = maintenancePlanStatus2;

const borrowStatus2 = [
  {
    value: -1,
    label: "全部",
  },
  {
    value: 10,
    label: "待提交",
  },
  {
    value: 20,
    label: "审核中",
  },
  {
    value: 30,
    label: "已通过",
  },
  {
    value: 40,
    label: "已驳回",
  },
  {
    value: 50,
    label: "借用中",
  },
  {
    value: 60,
    label: "已归还",
  },
  {
    value: 70,
    label: "已作废",
  },
];
// if (isEn) {
//   borrowStatus2.forEach((item, index) => {
//     item.label = langData("borrowStatus")[index];
//   });
// }
export const borrowStatus = borrowStatus2;

const reportCertificateTable2 = [
  {
    detectionItem: "证书报告中的送检信息是否无误？",
    content: "",
    result: 1,
  },
  {
    detectionItem: "被检设备是否在认可能力范围之内？",
    content: "",
    result: 1,
  },
  {
    detectionItem: "选用检定/校准规程是否符合要求？",
    content: "",
    result: 1,
  },
  {
    detectionItem: "使用测量标准和准确度等级是否符合？",
    content: "",
    result: 1,
  },
  {
    detectionItem: "对被检设备主要检定/校准项目是否覆盖？",
    content: "",
    result: 1,
  },
];
if (isEn) {
  reportCertificateTable2.forEach((item, index) => {
    item.detectionItem = langData("reportCertificateTable")[index];
  });
}
export const reportCertificateTable = reportCertificateTable2;
